-
Notifications
You must be signed in to change notification settings - Fork 243
(POC)Improve Users and Groups - Permission Performance #8473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| $this->loadUserPermissions(), | ||
| $this->loadGroupPermissions() | ||
| ); | ||
| // return array_merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this comments please?
| public function hasPermission($permissionString) | ||
| { | ||
| $permissionStrings = $this->loadPermissions(); | ||
| // $permissionStrings = $this->loadPermissions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the comments please?
| /** | ||
| * Check if user has any of the given permissions | ||
| */ | ||
| // public function hasAnyPermission(array $permissions): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the commented methods please?
| */ | ||
| private function addCategoryViewPermissions(array $permissions): array | ||
| { | ||
| $addFor = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be applied to other assets that have categories, like decision tables, data connectors, flow genies, etc?
| */ | ||
| public function boot(): void | ||
| { | ||
| // Publish configuration if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the comment code please?
| $this->loadUserPermissions(), | ||
| $this->loadGroupPermissions() | ||
| ); | ||
| // return array_merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code, delete it.
tests/Feature/ProfileTest.php
Outdated
| $user->is_administrator = true; | ||
| $user->save(); | ||
| $user->refresh(); | ||
| $user->invalidatePermissionCache(); // ✅ Invalidar cache para que los permisos tomen efecto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change it to English.
| /** | ||
| * Check if user has any of the given permissions | ||
| */ | ||
| // public function hasAnyPermission(array $permissions): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review the commented code.
|





refactor Permission module
Solution
How to Test
Describe how to test that this solution works.
Related Tickets & Packages
Code Review Checklist